package com.mixsmart.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.mixsmart.web.msgpush.ISendMessage;
import com.mixsmart.web.msgpush.impl.SendMsgFactory;

/**
 * 首页
 * @author lmq
 * @version 1.0
 * @since JDK版本大于等于1.6
 * <p>2016年3月29日</p>
 */
@Controller
public class IndexController {

	@RequestMapping("/index.do")
	public ModelAndView index() {
		ModelAndView modelView = new ModelAndView();
		modelView.setViewName("/index");
		return modelView;
	}
	
	@RequestMapping("/welcome.do")
	public ModelAndView welcome() {
		ModelAndView modelView = new ModelAndView();
		ISendMessage sendMsg = SendMsgFactory.getInstatnce().getSendMessage();
		sendMsg.sendAll("测试发送通知");
		System.out.println("发送推送....");
		modelView.setViewName("/welcome");
		return modelView;
	}
	
}
